#ifndef ConstraintItem_H
#define ConstraintItem_H

#include "Item.h"
#include <QtGui>
#include "..\core\ConstraintAttribute.h"

namespace Xps
{
	class ConstraintItem : public QObject, public Item 
	{
		Q_OBJECT

	
	private:
		Item* truenode;
		Item* falsenode;
		QMap<int, XpsAssets::ConstraintAttribute*> _attributes;

	public:
		ConstraintItem();

		QMap<int, XpsAssets::ConstraintAttribute*>* attributes();
		void updateChildMarker();
		void removeChildMarker();
		bool addChildNode(Item* item);
		bool removeChildNode(Item* item);
		void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
		Item* trueNode() { return truenode; }
		Item* falseNode() { return falsenode; }
		void hiddenSwap();

	public slots:
		void swap();

	};
}
#endif